import request from '@/api/request'

//查询退单列表
function addressList(data) {
  return request({
    url: `/lejuAdmin/companyAddress/addressList`,
    data
  })
}

//设置收货地址默认

function setReceiveOne(data) {
  return request({
    url: `/lejuAdmin/companyAddress/setReceiveOne`,
    method:'POST',
    data
  })
}

//设置发货默认

function setSendOne(data) {
  return request({
    url: `/lejuAdmin/companyAddress/setSendOne`,
    method:'POST',
    data
  })
}

//新增地址
function save(data) {
  return request({
    url: `/lejuAdmin/companyAddress/save`,
    method:'POST',
    data
  })
}

//删除地址
function companyAddress(id,data) {
  return request({
    url: `/lejuAdmin/companyAddress/${id}`,
    method:'DELETE',
    data
  })
}

//获取地址明细
function detailAddress(id,data) {
  return request({
    url: `/lejuAdmin/companyAddress/${id}`,
    data
  })
}

//更新地址
function update(data) {
  return request({
    url: `/lejuAdmin/companyAddress/update`,
    method:'POST',
    data
  })
}


export{
  addressList,setReceiveOne,setSendOne,save,companyAddress,detailAddress,update
}